﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/admin.master" AutoEventWireup="true" CodeFile="requests.aspx.cs" Inherits="admin_admins_requests" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainContent" Runat="Server">
    <div class="page-header">
        <h1>ACS Requests</h1>
    </div>
    <p>The following have requested admin login details for their univeristy ACS</p>
    <div>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CssClass="table" 
            DataKeyNames="ID" DataSourceID="SqlDataSource1" GridLines="None" 
            ondatabound="GridView1_DataBound" onrowdatabound="GridView1_RowDataBound">
            <Columns>
                <asp:BoundField DataField="ACS_NAME" HeaderText="ACS NAME" SortExpression="ACS_NAME" />
                <asp:BoundField DataField="UNIVERISTY_NAME" HeaderText="UNIVERISTY" 
                    SortExpression="UNIVERISTY_NAME" />
                <asp:BoundField DataField="CONTACT_NAME" HeaderText="NAME" SortExpression="CONTACT_NAME" />
                <asp:BoundField DataField="POSITION" HeaderText="POSITION" SortExpression="POSITION" />
                <asp:BoundField DataField="REQUEST_DATE" HeaderText="DATE" SortExpression="REQUEST_DATE" 
                    DataFormatString="{0:d}" HtmlEncode="False" />
                <asp:TemplateField HeaderText="Approved?">
                    <ItemTemplate>
                        <asp:Label ID="aLabel" CssClass="btn btn-link" runat="server" Text=""></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField>
                    <ItemTemplate>
                        <asp:HyperLink ID="HyperLink1" runat="server" CssClass="btn btn-primary btn-small" NavigateUrl='<%# "view-request.aspx?id=" + Eval("ID").ToString() %>' ToolTip="view details"><i class="icon-chevron-right icon-white"></i></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
                
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ApplicationServices %>" 
            SelectCommand="SELECT ADMIN_REQUEST.ID, ADMIN_REQUEST.ACS_NAME, ADMIN_REQUEST.UNI_ID, ADMIN_REQUEST.CONTACT_NAME, ADMIN_REQUEST.CONTACT_EMAIL, ADMIN_REQUEST.CONTACT_NUMBER, ADMIN_REQUEST.REQUEST_DATE, ADMIN_REQUEST.APPROVED, ADMIN_REQUEST.USERNAME, ADMIN_REQUEST.POSITION, UNIVERSITIES.UNIVERISTY_NAME FROM ADMIN_REQUEST INNER JOIN UNIVERSITIES ON ADMIN_REQUEST.ID = UNIVERSITIES.ID">
        </asp:SqlDataSource>
    </div>
</asp:Content>

